package com.gm.springboot.mapper;

import com.gm.springboot.bean.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * @Author Administrator
 * @Date 2020/7/2 14:16
 **/
public interface UserMapper {

    @Select("select * from tb_user where username=#{username}")
    UserInfo findUserByName(String username);

    @Insert("insert into tb_user(username,password,realname,phone,createTime,updateTime) values(#{username},#{password},#{realname},#{phone},#{createTime},#{updateTime})")
    int addUser(UserInfo userInfo);
}
